﻿@using Blog.Presentation.UIHelpers
@model Blog.Core.Entities.Article
@{
    ViewBag.Title = @Model.Title;
}
  
    
    <div class="post">
        
        <div class="h2-title">@Model.Title</div>
    		
        <div class="entry">@MvcHtmlString.Create(Model.Content)</div>
			

        <small>@Model.Date.ToString("dddd, dd MMMM yyyy")</small>
        
        @{ var cat = Model.GetCategories();}

        @for (var i = 0; i < cat.Length && cat[i] != "";i++ )
        { 
            
            <text>&nbsp;</text>@Html.ActionLink(cat[i], "CategoryView", "Articles", new { category = cat[i] }, null)
        }

	</div>	
    <b/><b/>
    <div id="disqus_thread"></div>

<script type="text/javascript">
    
     var disqus_shortname = 'scaparel';
     var disqus_identifier = '@Model.Id';
     var disqus_url = '@UrlExtensions.LinkToArticle(Model)';

    (function () {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
